package gui;

import javax.swing.JOptionPane;

import core.Agent;
import core.Environment;

public class Main extends Thread {
	Agent agent;
	Environment environment;

	public Main() {
		this.agent = new Agent(0, 0, 100);
		this.environment = new Environment(agent, Environment.Type.STATIC, 10);
	}

	@Override
	public void run() {
		super.run();
		
		while (this.environment.agent.renata_time > 0) {
			this.environment.update();

			System.out.println(this.environment.toString());

			this.environment.agent.renata_time--;

			try {
				Thread.sleep(1);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}

		JOptionPane.showMessageDialog(null, "E' arrivata Renata!");
	}

	public static void main(String[] args) {
		Thread thread = new Main();
		thread.start();
	}
}